package PathDemo;

import org.junit.Test;

import java.io.File;

public class PathDemo {
    @Test
    public void pathTest01(){
        File file = new File("a.txt");
        String path = file.getAbsolutePath();
        System.out.println(path);
    }

    @Test
    public void pathTest02(){
        String path = PathDemo.class.getResource("b.txt").getPath();
        System.out.println(path);
    }

    @Test
    public void pathTest03(){
        String path = PathDemo.class.getClassLoader().getResource("c.txt").getPath();
        // D:/Idea-workspace/api_2207/out/production/api_day09/c.txt
        System.out.println(path);
    }
}
